Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>The + operator concatenates (adds) strings.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var text1 = "Good "; var text2 = "Morning"; text1 += text2 document.getElementById("demo").innerHTML = text1; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_oper_string2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:54:29 GMT --> </html>
Result:
Try it Yourself - © w3schools.com